package practice;
class fsg{
    private int max = 0;
    private int number = 7;

    public fsg(){}
    public fsg(int max , int number){
        this.max = max;
        this.number = number;
    }
    public void setMax(int max){
        this.max = max;
    }
    public void setNumber(int number){
        this.number = number;
    }
    public void PrintAll(){
        System.out.println("Max :" + max);
        System.out.println("Number :" + number);
        for (int i = 1; i < max; i++) {
            if(i % number == 0  || i % 10 == number || i /10 % 10 == number) {
                System.out.print("过 ");
            }else{
                System.out.print(i+ " ");
            }
        }
    }

}

public class 逢七过 {
    public static void main(String[] args) {
//        int number = 7;
//        int max = 101;
//        for (int i = 1; i < max; i++) {
//            if(i % number == 0  || i % 10 == number || i /10 % 10 == number) {
//                System.out.print("过 ");
//            }else{
//                System.out.print(i+ " ");
//
//
//            }
//        }
        fsg fsg = new fsg();
        fsg.setMax(100);
        fsg.setNumber(8);
        fsg.PrintAll();
    }
}
